<template>
<h1>表单练习</h1>

  <el-form style="width: 200px;margin:0 auto;">
    <el-form-item label="用户名">
      <el-input placeholder="请输入用户名" v-model="user.name"></el-input>
    </el-form-item>
    <el-form-item label="密码">
      <el-input placeholder="请输入密码" v-model="user.password" show-password></el-input>
    </el-form-item>
    <el-form-item label="性别">
      <el-radio-group v-model="user.gender">
        <el-radio label="男" value="1"></el-radio>
        <el-radio label="女" value="0"></el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="所在地">
      <el-select v-model="user.city" placeholder="请选择所在城市">
        <el-option label="上海" value="sh"></el-option>
        <el-option label="北京" value="bj"></el-option>
        <el-option label="深圳" value="sz"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="管理员">
      <el-button type="primary" @click="reg" >点击注册</el-button>
    </el-form-item>
  </el-form>



</template>

<script setup>

import {ref} from "vue";

const user = ref({
  name:'',password:'',gender:'',city:'',
})
</script>


<style scoped>

</style>